<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->


<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-cn" xml:lang="zh-cn">
<head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
   
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="DC.Type" content="topic">
<meta name="DC.Title" content="检查并配置Oracle数据库的Open状态">
<meta name="product" content="">
<meta name="DC.Relation" scheme="URI" content="zh-cn_topic_0000001839268265.html">
<meta name="prodname" content="">
<meta name="version" content="">
<meta name="brand" content="30-OceanProtect 备份一体机 1.5.0-1.6.0 帮助中心">
<meta name="DC.Publisher" content="20240320">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="ZH-CN_TOPIC_0000001839188333">
<meta name="DC.Language" content="zh-cn">
<link rel="stylesheet" type="text/css" href="public_sys-resources/commonltr.css">
<title>检查并配置Oracle数据库的Open状态</title>
</head>
<body style="clear:both; padding-left:10px; padding-top:5px; padding-right:5px; padding-bottom:5px"><a name="ZH-CN_TOPIC_0000001839188333"></a><a name="ZH-CN_TOPIC_0000001839188333"></a>

<h1 class="topictitle1">检查并配置Oracle数据库的Open状态</h1>
<div><p>执行备份时，Oracle数据库所在主机必须处于开机状态，并且Oracle数据库为Open状态。以下步骤说明如何检查并配置Oracle数据库的Open状态。</p>
<div class="section"><h4 class="sectiontitle">操作步骤</h4><ol><li id="ZH-CN_TOPIC_0000001839188333__li1471695511518"><span>登录Oracle数据库主机。</span><p><ul id="ZH-CN_TOPIC_0000001839188333__ul1983714162204"><li id="ZH-CN_TOPIC_0000001839188333__li7258697580">如果是Linux操作系统，请使用PuTTY登录Oracle数据库主机，并执行<strong id="ZH-CN_TOPIC_0000001839188333__b119369483451">su - oracle</strong>命令，切换到<strong id="ZH-CN_TOPIC_0000001839188333__b2486163014495">oracle</strong>账户。</li><li id="ZH-CN_TOPIC_0000001839188333__li1366015032013">如果是Windows操作系统，请使用系统管理员登录Oracle数据库主机。</li></ul>
</p></li><li id="ZH-CN_TOPIC_0000001839188333__li14919010154311"><a name="ZH-CN_TOPIC_0000001839188333__li14919010154311"></a><a name="li14919010154311"></a><span>执行以下命令检查数据库是否已启动。</span><p><ul><li>如果是Linux操作系统，请执行以下命令：<p><strong>ps -ef|grep ora</strong></p>
<p>回显类似如下存在ora_<em>xx</em>进程，表示数据库已启动。</p>
<pre class="screen">[oracle@18csingle45 <font style="font-size:8pt" Face="Courier New" >~</font>]$ ps -ef|grep ora
oracle    76403      1  0 12:56 ?        00:00:10 ora_m002_orcl
oracle   159932      1  0 14:20 ?        00:00:05 ora_m003_orcl
oracle   175468      1  0 Apr07 ?        00:00:12 ora_pmon_orcl
oracle   175470      1  0 Apr07 ?        00:00:05 ora_clmn_orcl
oracle   175472      1  0 Apr07 ?        00:00:26 ora_psp0_orcl
oracle   175474      1  0 Apr07 ?        00:40:42 ora_vktm_orcl
oracle   175478      1  0 Apr07 ?        00:00:08 ora_gen0_orcl
oracle   175481      1  0 Apr07 ?        00:00:04 ora_mman_orcl
oracle   175485      1  0 Apr07 ?        00:00:50 ora_gen1_orcl
oracle   175488      1  0 Apr07 ?        00:00:09 ora_diag_orcl
oracle   175490      1  0 Apr07 ?        00:00:04 ora_ofsd_orcl
oracle   175493      1  0 Apr07 ?        00:01:27 ora_dbrm_orcl
oracle   175495      1  0 Apr07 ?        00:02:32 ora_vkrm_orcl
oracle   175497      1  0 Apr07 ?        00:00:09 ora_svcb_orcl
oracle   175499      1  0 Apr07 ?        00:00:25 ora_pman_orcl
oracle   175501      1  0 Apr07 ?        00:02:35 ora_dia0_orcl
oracle   175503      1  0 Apr07 ?        00:00:19 ora_dbw0_orcl
oracle   175505      1  0 Apr07 ?        00:00:13 ora_lgwr_orcl
oracle   175507      1  0 Apr07 ?        00:00:35 ora_ckpt_orcl
oracle   175509      1  0 Apr07 ?        00:00:02 ora_lg00_orcl
oracle   175511      1  0 Apr07 ?        00:00:06 ora_smon_orcl
oracle   175513      1  0 Apr07 ?        00:00:01 ora_lg01_orcl
oracle   175515      1  0 Apr07 ?        00:00:18 ora_smco_orcl
oracle   175517      1  0 Apr07 ?        00:00:04 ora_w000_orcl
oracle   175519      1  0 Apr07 ?        00:00:02 ora_reco_orcl
oracle   175521      1  0 Apr07 ?        00:00:04 ora_w001_orcl
oracle   175523      1  0 Apr07 ?        00:00:17 ora_lreg_orcl
oracle   175525      1  0 Apr07 ?        00:00:04 ora_pxmn_orcl
oracle   175529      1  0 Apr07 ?        00:01:05 ora_mmon_orcl
oracle   175531      1  0 Apr07 ?        00:01:02 ora_mmnl_orcl
oracle   175533      1  0 Apr07 ?        00:00:02 ora_d000_orcl
oracle   175535      1  0 Apr07 ?        00:00:02 ora_s000_orcl
oracle   175537      1  0 Apr07 ?        00:00:03 ora_tmon_orcl
oracle   177437      1  0 Apr07 ?        00:00:02 ora_arc0_orcl
oracle   177439      1  0 Apr07 ?        00:00:02 ora_tt00_orcl
oracle   177441      1  0 Apr07 ?        00:00:02 ora_tt01_orcl
oracle   177444      1  0 Apr07 ?        00:00:02 ora_arc1_orcl
oracle   177450      1  0 Apr07 ?        00:00:02 ora_arc2_orcl
oracle   177457      1  0 Apr07 ?        00:00:02 ora_arc3_orcl
oracle   177459      1  0 Apr07 ?        00:00:07 ora_tt02_orcl
oracle   177483      1  0 Apr07 ?        00:00:02 ora_aqpc_orcl
oracle   177494      1  0 Apr07 ?        00:00:04 ora_w002_orcl
oracle   177499      1  0 Apr07 ?        00:00:07 ora_p000_orcl
oracle   177501      1  0 Apr07 ?        00:00:07 ora_p001_orcl
oracle   177503      1  0 Apr07 ?        00:00:07 ora_p002_orcl
oracle   177505      1  0 Apr07 ?        00:00:07 ora_p003_orcl
oracle   177507      1  0 Apr07 ?        00:03:35 ora_cjq0_orcl
oracle   178617      1  0 Apr07 ?        00:00:04 ora_w003_orcl
oracle   179771      1  0 Apr07 ?        00:00:04 ora_w004_orcl
oracle   179794      1  0 Apr07 ?        00:00:02 ora_qm02_orcl
oracle   179800      1  0 Apr07 ?        00:00:03 ora_q002_orcl
oracle   179804      1  0 Apr07 ?        00:00:02 ora_q003_orcl
root     184058 183212  0 14:45 pts/0    00:00:00 su - oracle
oracle   184059 184058  0 14:45 pts/0    00:00:00 -bash
oracle   186418      1  0 14:46 ?        00:00:01 ora_m005_orcl
root     186471 184059  0 14:46 pts/0    00:00:00 su - oracle
oracle   186475 186471  0 14:46 pts/0    00:00:00 -bash
oracle   191769      1  0 Apr07 ?        00:00:05 ora_w005_orcl
oracle   191773      1  0 Apr07 ?        00:00:04 ora_w006_orcl
oracle   191812      1  0 Apr07 ?        00:00:04 ora_w007_orcl
oracle   195441      1  0 14:55 ?        00:00:00 ora_m000_orcl
oracle   198133 239014  0 14:58 pts/1    00:00:00 sqlplus
oracle   198175 198133  0 14:58 ?        00:00:00 oracleorcl (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq)))
oracle   213064 186475  0 15:13 pts/0    00:00:00 ps -ef
oracle   213065 186475  0 15:13 pts/0    00:00:00 grep --color=auto ora
root     239013  10102  0 Apr07 pts/1    00:00:00 su - oracle
oracle   239014 239013  0 Apr07 pts/1    00:00:00 -bash</pre>
</li><li>如果是Windows操作系统，请执行以下操作：<ol type="a"><li id="ZH-CN_TOPIC_0000001839188333__li17364121904519">在键盘上按<span class="uicontrol" id="ZH-CN_TOPIC_0000001839188333__uicontrol11819941114510">“Win+R”</span>，打开运行窗口。</li><li>输入<span class="parmvalue">“services.msc”</span>，进入服务界面查看服务状态。<p>当以<span class="parmvalue">“Oracle”</span>开头的服务状态为“正在运行”时，表示数据库已启动。</p>
</li></ol>
</li></ul>
</p></li><li id="ZH-CN_TOPIC_0000001839188333__li14572194814339"><span>执行以下命令，登录Oracle数据库实例。</span><p><ul id="ZH-CN_TOPIC_0000001839188333__ul7420345341"><li id="ZH-CN_TOPIC_0000001839188333__li15682124913711">OS认证：<ul id="ZH-CN_TOPIC_0000001839188333__ul89443983816"><li id="ZH-CN_TOPIC_0000001839188333__li18420124173415">如果是Linux操作系统，请执行以下命令：<p id="ZH-CN_TOPIC_0000001839188333__p95148598366"><a name="ZH-CN_TOPIC_0000001839188333__li18420124173415"></a><a name="li18420124173415"></a><strong id="ZH-CN_TOPIC_0000001839188333__b14236563719">export ORACLE_SID=</strong><em id="ZH-CN_TOPIC_0000001839188333__i85144598369">数据库实例名称</em></p>
<p id="ZH-CN_TOPIC_0000001839188333__p145141259153613"><strong id="ZH-CN_TOPIC_0000001839188333__b1597618293715">sqlplus / as sysdba</strong></p>
</li><li id="ZH-CN_TOPIC_0000001839188333__li7402151163816">如果是Windows操作系统，请执行以下操作：<ol type="a" id="ZH-CN_TOPIC_0000001839188333__ol124110408264"><li id="ZH-CN_TOPIC_0000001839188333__li624120402267">在键盘上按<span class="uicontrol" id="ZH-CN_TOPIC_0000001839188333__zh-cn_topic_0000001839188333_uicontrol11819941114510">“Win+R”</span>，打开运行窗口。</li><li id="ZH-CN_TOPIC_0000001839188333__li161821338277">输入<span class="parmvalue" id="ZH-CN_TOPIC_0000001839188333__parmvalue122291222476">“cmd”</span>，执行以下命令。<p id="ZH-CN_TOPIC_0000001839188333__p1755152313372"><strong id="ZH-CN_TOPIC_0000001839188333__b19591532143713">set ORACLE_SID=</strong><em id="ZH-CN_TOPIC_0000001839188333__i16755423133718">数据库实例名称</em></p>
<p id="ZH-CN_TOPIC_0000001839188333__p1075515234379"><strong id="ZH-CN_TOPIC_0000001839188333__b540852910371">sqlplus / as sysdba</strong></p>
</li></ol>
</li></ul>
</li><li id="ZH-CN_TOPIC_0000001839188333__li105571236103417">数据库认证：<ul id="ZH-CN_TOPIC_0000001839188333__ul1136516538386"><li id="ZH-CN_TOPIC_0000001839188333__li1723334817382">如果是Linux操作系统，请执行以下命令：<p id="ZH-CN_TOPIC_0000001839188333__p920984963717"><a name="ZH-CN_TOPIC_0000001839188333__li1723334817382"></a><a name="li1723334817382"></a><strong id="ZH-CN_TOPIC_0000001839188333__b19174355163720">export ORACLE_SID=</strong><em id="ZH-CN_TOPIC_0000001839188333__i1420924973715">数据库实例名称</em></p>
<p id="ZH-CN_TOPIC_0000001839188333__p182093496371"><strong id="ZH-CN_TOPIC_0000001839188333__b034785743716">sqlplus</strong></p>
<p id="ZH-CN_TOPIC_0000001839188333__p17915722412">根据提示输入具备<strong id="ZH-CN_TOPIC_0000001839188333__b1691518214115">sysdba</strong>权限的用户：</p>
<pre class="screen" id="ZH-CN_TOPIC_0000001839188333__screen9915112104114"><em id="ZH-CN_TOPIC_0000001839188333__i1915102164113">username </em>as sysdba</pre>
<p id="ZH-CN_TOPIC_0000001839188333__p159150224117">根据提示输入密码。</p>
</li><li id="ZH-CN_TOPIC_0000001839188333__li122822426407">Windows OS执行以下命令：<ol type="a" id="ZH-CN_TOPIC_0000001839188333__ol587720252273"><li id="ZH-CN_TOPIC_0000001839188333__li5168124414479">在键盘上按<span class="uicontrol" id="ZH-CN_TOPIC_0000001839188333__zh-cn_topic_0000001839188333_uicontrol11819941114510_1">“Win+R”</span>，打开运行窗口。</li><li id="ZH-CN_TOPIC_0000001839188333__li3877172517270">输入<span class="parmvalue" id="ZH-CN_TOPIC_0000001839188333__parmvalue2059612503475">“cmd”</span>，执行以下命令。<p id="ZH-CN_TOPIC_0000001839188333__p8745723103813"><strong id="ZH-CN_TOPIC_0000001839188333__b9408122923816">set ORACLE_SID=</strong><em id="ZH-CN_TOPIC_0000001839188333__i12745162318389">数据库实例名称</em></p>
<p id="ZH-CN_TOPIC_0000001839188333__p15745182333814"><strong id="ZH-CN_TOPIC_0000001839188333__b11154427163811">sqlplus</strong></p>
<p id="ZH-CN_TOPIC_0000001839188333__p71274192512">根据提示输入具备<strong id="ZH-CN_TOPIC_0000001839188333__b17349199162611">sysdba</strong>权限的用户：</p>
<pre class="screen" id="ZH-CN_TOPIC_0000001839188333__screen18896121620243"><em id="ZH-CN_TOPIC_0000001839188333__i380114413256">username </em>as sysdba</pre>
<p id="ZH-CN_TOPIC_0000001839188333__p15251105852511">根据提示输入密码。</p>
</li></ol>
</li></ul>
</li></ul>
</p></li><li><span>如果<a href="#ZH-CN_TOPIC_0000001839188333__li14919010154311">2</a>检查到未启动数据库进程，执行以下命令启动数据库进程。否则请跳过。</span><p><p><strong>startup;</strong></p>
</p></li><li><span>执行以下命令检查数据库状态。</span><p><p><strong>select instance_name,status from v$instance;</strong></p>
<ul><li>当回显中<span class="parmname">“STATUS”</span>为<span class="parmvalue">“open”</span>时，表示数据库为Open状态。</li><li>当回显中<span class="parmname">“STATUS”</span>为非<span class="parmvalue">“open”</span>时，请联系管理员将数据库开启至Open状态后再进行备份。</li></ul>
<pre class="screen">SQL&gt; select instance_name,status from v$instance; 
 INSTANCE_NAME    STATUS 
 ---------------- ------------ 
 orcl            open</pre>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>父主题：</strong> <a href="zh-cn_topic_0000001839268265.html">步骤1：检查并配置数据库环境</a></div>
</div>
</div>

<div class="hrcopyright"><hr size="2"></div><div class="hwcopyright">版权所有 &copy; 华为技术有限公司</div></body>
</html>